<template>
  <div id="app">
      <div class="header">
        header
      </div>
      
      <div class="aside">
        <el-menu router
          :default-active="this.$router.path"
          class="el-menu-vertical-demo"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b">
          <el-menu-item index="/Records">记录</el-menu-item>
          <el-menu-item index="/RecordsType">管理</el-menu-item>
          <el-menu-item index="/RecordsChart">记账报表</el-menu-item>
          <el-menu-item index="5">管理模块</el-menu-item>
        </el-menu>
      </div>
      
      <div class="main">
        <router-view></router-view>
      </div>

      <div class="footer">
        Footer
      </div>

  </div>
</template>

<script>
export default {
  name: 'App',
  components: {
    
  },
  data(){
    return {
      activeIndex: '1',
      user: {

      }
    }
  },
  mounted(){
    //初始化个人信息
    // this.$http.get('/records/getRecordsTotalForUserOrTeam', {
    //   params: {
    //     rcIdRel: 1,
    //     rcRecordType: 2
    //   }
    // })
    // .then(response => {
    //   console.log(response)
    //   this.recordsList = response.data.obj;
    // })
    // .catch(error => {
    //   console.error(error);
    // });
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style>
#app {
  color: #2c3e50;
}
body {
  margin: 0;
  padding: 0;
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #545c64;
  color: #fff;
  text-align: center;
  line-height: 62px;
  z-index: 9999;
}
.aside {
  position: fixed;
  top: 62px;
  left: 0;
  width: 15%;
  height: calc(100% - 100px);
  background-color: #f5f5f5;
  border-right: 1px solid #ccc;
  overflow: auto;
}
.main {
  margin-top: 50px;
  margin-left: 15%;
  margin-bottom: 100px;
  padding: 20px;
  height: calc(100% - 100px);
}
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 62px;
  background-color: #545c64;
  color: #fff;
  text-align: center;
  line-height: 50px;
  z-index: 9999;
}
</style>
